package com.guoliang.eduService.entity.subject;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ：Leo
 * @date ：Created in 2023/1/18 14:56
 * @description：
 */
@Data
public class OneSubject {
    private String id;
    private String title;
    private List<TwoSubject> children=new ArrayList<>();

    public OneSubject(String id, String title) {
        this.id = id;
        this.title = title;
    }
    public OneSubject childrenPut(TwoSubject twoSubject){
        this.children.add(twoSubject);
        return this;
    }
}
